vfunc_allocate(container, box) {
const containerBox = container.allocation;
+ const [containerWidth, containerHeight] = containerBox.get_size();
const containerAllocationChanged =
this._lastBox === null || !this._lastBox.equal(containerBox);
this._lastBox = containerBox.copy();
this.notify('layout-frozen');
}
+ const { ControlsState } = OverviewControls;
+ const inSessionTransition =
+ this._overviewAdjustment.value <= ControlsState.WINDOW_PICKER;
+
+ const window = this._sortedWindows[0];
+
+ if (inSessionTransition || !window) {
+ container.remove_clip();
+ } else {
+ const [, bottomOversize] = window.chromeHeights();
+ const [containerX, containerY] = containerBox.get_origin();
+
+ const extraHeightProgress = this._overviewAdjustment.value -
+ OverviewControls.ControlsState.WINDOW_PICKER;
+
+ const extraClipHeight = bottomOversize * (1 - extraHeightProgress);
+
+ container.set_clip(containerX, containerY,
+ containerWidth, containerHeight + extraClipHeight);
+ }
+
let layoutChanged = false;
if (!this._layoutFrozen) {
if (this._layout === null) {
const workareaWidth = this._workarea.width;
const stateAdjustementValue = this._stateAdjustment.value;
- const allocationScale = containerBox.get_width() / workareaWidth;
+ const allocationScale = containerWidth / workareaWidth;
const childBox = new Clutter.ActorBox();
- const { ControlsState } = OverviewControls;
- const inSessionTransition =
- this._overviewAdjustment.value <= ControlsState.WINDOW_PICKER;
-
const nSlots = this._windowSlots.length;
for (let i = 0; i < nSlots; i++) {
let [x, y, width, height, child] = this._windowSlots[i];
});
this._overviewAdjustment = overviewAdjustment;
- this._overviewStateId = overviewAdjustment.connect('notify::value', () => {
- const overviewState = overviewAdjustment.value;
-
- // We want windows not to spill out when the overview is in
- // APP_GRID state, but HIDDEN and WINDOW_PICKER should allow
- // them to eventually draw outside the workspace.
- this._container.clip_to_allocation =
- overviewState > OverviewControls.ControlsState.WINDOW_PICKER;
- });
this.monitorIndex = monitorIndex;
this._monitor = Main.layoutManager.monitors[this.monitorIndex];
this._layoutFrozenId = 0;
}
- if (this._overviewStateId > 0) {
- this._overviewAdjustment.disconnect(this._overviewStateId);
- delete this._overviewStateId;
- }
-
this._windows = [];
}